package cn.smxy.admin.service;


import cn.smxy.param.CampusRemoveParam;
import cn.smxy.param.CampusSearchParam;
import cn.smxy.param.PageParam;
import cn.smxy.param.UserSearchParam;
import cn.smxy.pojo.Campus;
import cn.smxy.pojo.User;
import cn.smxy.util.R;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface UserService {
    /**
     * excel批量导入
     *
     * @param file
     * @return
     * @throws IOException
     */
    R saveExcel(MultipartFile file) throws IOException;

    /**
     * 删除用户
     *
     * @param userId
     * @return
     */
    R delete(Long userId);


    /**
     * 修改用户信息
     *
     * @param user
     * @return
     */
    R update(User user);

    /**
     * 分页展示用户列表
     *
     * @param pageParam
     * @return
     */
    R page(PageParam pageParam);

    /**
     * 用户信息详情
     *
     * @param userId
     * @return
     */
    User basic(Long userId);

    /**
     * 添加用户
     *
     * @param user
     * @return
     */
    R save(User user);

    /**
     * 图片上传
     * @param img
     * @return
     */
    Object upload(MultipartFile img) throws Exception;

    /**
     * 模糊分页查询用户
     * @param userSearchParam
     * @return
     */
    R search(UserSearchParam userSearchParam);

    /**
     * excel导出
     * @param response
     */
    void export(HttpServletResponse response) throws IOException;

    /**
     * 分页展示校园认证
     * @param campusSearchParam
     * @return
     */
    R campusPage(CampusSearchParam campusSearchParam);

    /**
     * 校园学生认证
     * @param campus
     * @return
     */
    R check(Campus campus);

    /**
     * 校园认证批量删除
     * @param campusRemoveParam 校园认证ID集合 用户ID集合
     * @return
     */
    R campusRemoveBatch(CampusRemoveParam campusRemoveParam);
}
